﻿@model Orders
@{
    Layout = null;
    Sysconfig config = ViewData["config"] as Sysconfig;
    Users userModel = ViewBag.userModel as Users;   
}
<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>修改收货信息</title>
    <link rel="stylesheet" type="text/css" href="/mobile/css/validate.css" />
    <link rel="stylesheet" type="text/css" href="/mobile/css/style.css" />
    <script type="text/javascript" charset="utf-8" src="/scripts/jquery/PCASClass.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/zepto.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/weui.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/mvalidate.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/mvalidate-extend.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/common.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/cart.js"></script>
    <script type="text/javascript">
        $(function () {
            //初始化地区
                var mypcas = new PCAS("province,所属省份", "city,所属城市", "area,所属地区");
                var areaArr = ("@Model.area").split(",");
                if (areaArr.length == 3) {
                    mypcas.SetValue(areaArr[0], areaArr[1], areaArr[2]);
                }
            //初始化表单
            AjaxInitForm('#orderForm', '#btnSubmit', 0);
        });
    </script>
</head>

<body ontouchstart>
    <div class="page">
        <!--页面头部-->
        <div class="header">
            <a class="back" href="javascript:history.back();">
                <i class="iconfont icon-arrow-left"></i>
            </a>
            <h3>修改收货信息</h3>
            <div class="right">
                <a class="weui-cell_access weui-cell_link" asp-area="Web" asp-controller="Index" asp-action="Index">
                    <i class="iconfont icon-home"></i>
                </a>
            </div>
        </div>
        <!--/页面头部-->
        <!--页面内容-->
        <div class="page__bd">

        <form id="orderForm" name="orderForm" url="/submit_ajax?action=edit_order_address">
            <!--收货地址-->
            <div class="weui-panel weui-panel_access" style="margin-top:10px;">
                <div class="weui-panel__hd">收货地址</div>
                <div class="weui-panel__bd">
                    <div class="weui-cells_form form-box">
                        <input name="book_id" id="book_id" type="hidden" value="0" />
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">收件人</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="accept_name" name="accept_name" value="@Model.accept_name" class="weui-input" type="text" placeholder="收件人名称" data-validate="s" />
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">所属地区</label>
                            </div>
                            <div class="weui-cell__bd">
                                <select id="province" name="province" class="select"></select>
                                <select id="city" name="city" class="select"></select>
                                <select id="area" name="area" class="select"></select>
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">详细地址</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="address" name="address" value="@Model.address" class="weui-input" type="text" placeholder="详细地址" data-validate="s" />
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">手机号</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="mobile" name="mobile" value="@Model.mobile" class="weui-input" type="tel" placeholder="请输入手机号" data-validate="m" />
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">电话</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="telphone" name="telphone" value="@Model.telphone" class="weui-input" type="text" placeholder="电话号码，非必填" />
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">邮箱</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="email" name="email" value="@Model.email" class="weui-input" type="text" placeholder="方便通知，非必填" />
                            </div>
                        </div>

                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">邮政编码</label>
                            </div>
                            <div class="weui-cell__bd">
                                <input id="post_code" name="post_code" value="@Model.post_code" class="weui-input" type="text" placeholder="邮政编码，非必填" />
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <!--/收货地址-->
            <input id="order_id" name="order_id" value="@Model.id" type="hidden" />
            <div class="weui-panel weui-panel_access">
                <div class="weui-panel__bd">
                    <div class="weui-form-preview form-preview">
                        <div class="weui-form-preview__ft">
                            <a class="weui-form-preview__btn weui-form-preview__btn_default" asp-area="Web" asp-controller="UserOrder" asp-action="Index">返回订单中心</a>
                            @if (Model.express_status != 2)
                            {
                                <button id="btnSubmit" type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary">确认修改</button>
                            }
                            else
                            {
                                <button id="btnSubmit" type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary" disabled="disabled">确认修改</button>
                            }
                        </div>
                    </div>

                </div>
            </div>
        </form>
            <!--/结算信息-->
            <!--版权信息-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Copyright.cshtml")
            <!--/版权信息-->
            <!--底部导航-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Footer.cshtml")
            <!--/底部导航-->

        </div>
        <!--/页面内容-->

    </div>
</body>
</html>
